package com.ykt.model;

import java.util.List;

import com.jfinal.plugin.activerecord.Page;
import com.ykt.interceptor.Seach;

public class Postage extends SeachModel<Postage>{
	private static final long serialVersionUID = 1L;
	public static final Postage dao = new Postage();
	
	public Shop getShop(){
		return Shop.dao.findById(get("shop_id"));
	}
	@Override
	public Page<Postage> paginate(int pageNumber, int rows, Seach seach) {
		return super.paginateHasShop(pageNumber, rows, seach);
	}
	public List<Postage> findPostageByShopId(int shopId){
		return dao.find("select * from postage where shop_id=? ", shopId);
	}
}
